listboxrowaccessible: Avoid assertion failure
authorTimm Bäder <mail@baedert.org>
Sat, 26 Jul 2014 11:38:55 +0000 (13:38 +0200)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 3 Aug 2014 00:48:26 +0000 (02:48 +0200)
The next call to gtk_list_box_get_selection_mode just expected the
GtkListBoxRow's parent to be a GtkListBox and failed when the row was
added to something other than a GtkListBox.

https://bugzilla.gnome.org/show_bug.cgi?id=733782

gtk/a11y/gtklistboxrowaccessible.c

index 13831ae9be277ad92346fa96737383292b1957d9..27f962347ed9998b56a81b6b692e7aede231d35f 100644 (file)
@@ -51,6 +51,7 @@ gtk_list_box_row_accessible_ref_state_set (AtkObject *obj)
     {
       parent = gtk_widget_get_parent (widget);
       if (parent != NULL && 
+          GTK_IS_LIST_BOX (parent) &&
           gtk_list_box_get_selection_mode (GTK_LIST_BOX (parent)) != GTK_SELECTION_NONE)
         atk_state_set_add_state (state_set, ATK_STATE_SELECTABLE);